#ifndef _BKS_EVENT_H_
#define _BKS_EVENT_H_

#include <ostream>
#include "global_def.h"

class BKSEvent{
public:
    BKSEvent(u32 eid, u32 syn):_eid(eid), _syn(syn)
    {

    }

    virtual ~BKSEvent()
    {

    }

    void set_eid(u32 eid)
    {
        _eid = eid;
    }

    u32 get_eid() const
    {
        return _eid;
    }

    u32 get_syn() const
    {
        return _syn;
    }

    void set_arg(void *arg)
    {
        _arg = arg;
    }

    void* get_arg()
    {
        return _arg;
    }

    static u32 generateSyn();

    virtual std::ostream &dump(std::ostream &out){
        return out;
    }

    virtual bool SerializeToArray(char *_write_msg_buf, u32 write_msg_len){
        return FALSE;
    }

    virtual i32 ByteSize(){
        return 0;
    }

private:
    u32 _eid;
    u32 _syn;
    void *_arg;
};
#endif